<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}">
    <title>表格式和不分拣部分内容设置</title>
</head>
<body>
<form id="upload" action="http://127.0.0.1:5000/classify" method="post">
    <input type="submit" value="提交">
    {% for key, value in choose_data.items() %}
    {% if value['choose'] == 'yes' %}
    <div id="{{ key }}">
        <h3 style="display: inline-block">表名: {{ key }}</h3>
        <input type="button" value="添加" onclick="addInput('{{ key }}')">
        <div class="{{ key }}_div" id="{{ key }}_div_0">
            <input type="hidden" value="{{ key }}" name="{{ key }}_sheetName_0" class="input">
            <label for="{{ key }}_startMerge_0">合并开始的行列:</label>
            <input type="text" name="{{ key }}_startMerge_0" id="{{ key }}_startMerge_0" class="input">
            <label for="{{ key }}_endMerge_0">合并结束的行列:</label>
            <input type="text" name="{{ key }}_endMerge_0" id="{{ key }}_endMerge_0" class="input">
            <label for="{{ key }}_selectValue_0">此位置的值:</label>
            <select name="{{ key }}_selectValue_0" id="{{ key }}_selectValue_0"
                    onchange="handleSelectChange(event, '{{ key }}')" style="display: inline-block">
                <option value="sign" selected>分拣标志:</option>
                <option value="num">被分拣的数量</option>
                <option value="sum">某一列的和</option>
                <option value="mean">某一列的平均值</option>
                <option value="median">某一列的中位数</option>
                <option value="min">某一列的最小值</option>
                <option value="max">某一列的最大值</option>
                <option value="userDefined">自定义</option>
            </select>
            <label for="{{ key }}_value_0" style="display: none" id="{{ key }}_valueLabel_0">所选择的列:</label>
            <input type="number" name="{{ key }}_value_0" id="{{ key }}_value_0" style="display: none" class="input">
            <label for="{{ key }}_alignment_0">对齐方式:</label>
            <select name="{{ key }}_alignment_0" id="{{ key }}_alignment_0">
                <option value="median">居中对齐</option>
                <option value="left">左对齐</option>
                <option value="right">右对齐</option>
            </select>
            <label for="{{ key }}_fontSize_0">字体大小:</label>
            <input type="text" id="{{ key }}_fontSize_0" name="{{ key }}_fontSize_0" value="24" class="input1">
            <label for="{{ key }}_fontType_0">字体:</label>
            <input type="text" id="{{ key }}_fontType_0" name="{{ key }}_fontType_0" value="微软雅黑" class="input2">
            <input type="button" value="删除" onclick="deleteNode('{{ key }}')">
        </div>
    </div>
    {% endif %}
    {% endfor %}
</form>
</body>
<script>
    let data = {}
</script>
<script src="/static/js/sheet_deal.js"></script>
<style>
    .input {
        width: 40px;
    }

    .input1 {
        width: 25px;
    }

    .input2 {
        width: 80px;
    }
</style>
</html>